package com.hmall.api.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;

//此类就像Mapper接口一样，会被openFeign动态代理实现实现类--该实现类用于先向nacos根据FeignClient的名字查询服务，
// 得到ip和端口号
// 然后再发送请求
@FeignClient("cart-service")
public interface CartClient {

    @DeleteMapping("/carts")
    void deleteCartItemByIds(@RequestParam("ids") Collection<Long> ids);
}